const modules = import.meta.glob('./*/index.tsx', { eager: true })

const components = {}

Object.keys(modules).forEach((key) => {
  // const name = key.replace(/\.\/(.*)\/index\.(tsx|vue)/, '$1')
  const model = modules[key]?.default || modules[key]
  components[model.key] = model
});

console.log('base-component', Object.keys(components))

export default components
